package com.wyth.lottery.base;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Window;
import android.view.WindowManager;


import com.wyth.lottery.service.presenter.DetailPresenter;
import com.wyth.lottery.service.view.DetailView;

import butterknife.ButterKnife;


/**
 * Created by  on 2017/9/4
 */

public abstract class BaseActivity extends FragmentActivity {

    protected Activity activity;
    protected Bundle savedInstanceState;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

        setContentView(getContentID());
        this.savedInstanceState=savedInstanceState;
        activity = this;
        ButterKnife.bind(this);
        initView();
        initDate();



    }

    protected abstract int getContentID();

    protected abstract void initView();

    protected abstract void initDate();

    @Override
    protected void onRestart() {
        super.onRestart();
    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

}

